% Autor:
% Fecha: 6/11/2013

%Umpierrez,Noya,Ferrero.

d
get_codigos(Stream,[Cabeza|Cola]):-is_stream(Stream),get_code(Stream,X),( is_stream(Stream),at_end_of_stream(Stream),finstream(Stream,[X|[Cabeza,Cola]]); !,is_stream(Stream),not(at_end_of_stream(Stream)),((X \= 10 , write('Hola '); Cabeza is 0  ) ,get_codigos(Stream,[X|[Cabeza,Cola]]);(X is 10 ,write('Salto de Linea '),get_codigos(Stream,[X|[Cabeza,Cola]])))).


finstream(Stream,[X|[Cabeza,Cola]]):- write('Hola'),is_stream(Stream),close(Stream),write([X|[Cabeza,Cola]]).